/*
 * Copyright 2010. 
 * 
 * This document may not be reproduced, distributed or used 
 * in any manner whatsoever without the expressed written 
 * permission of xrkol Corp. 
 * 
 * $Rev: Rev $
 * $Author: Author $
 * $LastChangedDate: LastChangedDate $
 *
 */

package com.xrkol.sharelib.service;

import java.util.List;

import com.xrkol.sharelib.entity.Clazz;
import com.xrkol.sharelib.entity.Student;
import com.xrkol.sharelib.entity.Teacher;

/**
 * @author peng.xia
 * 
 */
public interface TeacherService extends BaseService<Teacher, String> {

	/**
	 * 根据用户名查找用户
	 * 
	 * @param string
	 * @return
	 */
	Teacher findByUserName(String userName);

	/**
	 * 分页查询教师信息
	 * 
	 * @param page
	 * @param schoolId
	 * @return
	 */
	List<Teacher> findTeachersWithPagination(String schoolId, Integer page);

	/**
	 * 获取所有的教师信息
	 * 
	 * @return
	 */
	List<Teacher> getAllTeachers(String schoolId);

	/**
	 * 找到多个学生对应的所有老师
	 * 
	 * @param students
	 * @return
	 */
	List<Teacher> findTeachersByStudents(List<Student> students);

	Teacher findByUserId(String userId);

	boolean checkExist(Teacher teacher);

	/**
	 * 根据班级查找所有的任课老师
	 * 
	 * @param clazz
	 * @return
	 */
	List<Teacher> getTeachersByClass(Clazz clazz);

	/**
	 * 判断是否是班主任
	 * 
	 * @param teacher
	 * @return
	 */
	public boolean isAdvisor(Teacher teacher);

	/**
	 * 判断老师是否在任教
	 * 
	 * @param teacher
	 * @return
	 */
	boolean isTheching(Teacher teacher);

	/**
	 * 获取学校所有管理员
	 * @param schoolId
	 * @param page
	 * @return
	 */
	List<Teacher> findManagers(String schoolId, Integer page);

}
